package org.example.sward.tooffer;

public class Fib {
    public int fib(int n){
        int a = 0,b=1,sum;
        for (int i = 0; i < n; i++) {
            sum = (a + b)%1000000007;
            a = b;
            b = sum;
        }
        return a;
    }

    public static void main(String[] args) {
        Fib f = new Fib();
        f.fib(3);
    }
}
